package com.ruoyi.conference.controller;

import cn.hutool.core.util.XmlUtil;
import cn.hutool.http.HttpRequest;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.ruoyi.conference.domain.ConferenceRequestParams;
import com.ruoyi.conference.domain.MeetingInfo;
import org.jsoup.Jsoup;
import org.jsoup.nodes.Document;
import org.jsoup.select.Elements;


import java.io.File;
import java.util.List;

public class conferencetest {
    public static void main(String[] args) {
        String xml = "{\n" +
                "    \"verifyPlanInfo\": {\n" +
                "      \"params\": {},\n" +
                "      \"planid\": 75,\n" +
                "      \"status\": 1,\n" +
                "      \"createdate\": \"2020-11-10 09:04:24\",\n" +
                "      \"verifytype\": \"ygx测试类型\",\n" +
                "      \"factorycode\": \"1000\",\n" +
                "      \"parentid\": -1,\n" +
                "      \"verifyitinerary\": \"as\",\n" +
                "      \"verifynotice\": \"as\",\n" +
                "      \"groupleaderid\": 25,\n" +
                "      \"templateid\": \"e869abec998947418c790036fce938b4\",\n" +
                "      \"globalcommit\": 0,\n" +
                "      \"source\": 0\n" +
                "    },\n" +
                "    \"verifyPlanInfos\": [\n" +
                "      {\n" +
                "        \"vpi\": {\n" +
                "          \"params\": {},\n" +
                "          \"planid\": 76,\n" +
                "          \"status\": 0,\n" +
                "          \"verifystarttime\": \"2020-11-10 00:00:00\",\n" +
                "          \"verifyplace\": \"sa\",\n" +
                "          \"createdate\": \"2020-11-10 09:02:31\",\n" +
                "          \"suppliername\": \"czxc\",\n" +
                "          \"verifytype\": \"ygx测试类型\",\n" +
                "          \"factorycode\": \"1000\",\n" +
                "          \"parentid\": 75,\n" +
                "          \"supplycategory\": \"螺柱\",\n" +
                "          \"supplycategorys\": [\n" +
                "            \"螺柱\"\n" +
                "          ],\n" +
                "          \"verifynotice\": \"as\",\n" +
                "          \"operation\": \"Read\",\n" +
                "          \"currentcommited\": \"未提交\",\n" +
                "          \"globalcommit\": 0,\n" +
                "          \"source\": 0\n" +
                "        },\n" +
                "        \"vpmm\": []\n" +
                "      }\n" +
                "    ]\n" +
                "  }";
//        JSON.parseObject(xml, VerifyPlanInfo.class)
        String conferenceID=null;

        Document parse = Jsoup.parse(xml);
        String elementsByTag = parse.getElementsByTag("conferenceID").text();
        String password = parse.getElementsByTag("password").text();
        String userUUID = parse.getElementsByTag("userUUID").text();
        String chairJoinUri = parse.getElementsByTag("chairJoinUri").text();
        String guestJoinUri = parse.getElementsByTag("guestJoinUri").text();

        System.out.println(elementsByTag);

//        MeetingInfo meetingInfo = JSON.parseObject(JSON.toJSONString(meetObject), MeetingInfo.class);


        int b = "abcdeb".indexOf("b");

        System.out.println("accessToken: "+ b);
    }
}
